
//递归校验路由权限
let recursionRoutes = (menuList, routes) => {

    // console.log('menuList', menuList)
    // console.log('routes', routes)
    let userMenu = []
    menuList.forEach(menu => {
        routes.forEach(route => {
            if (menu.title === route.meta.title) {
                if (route.children && route.children.length) {
                    route.children = recursionRoutes(menu.children, route.children)
                }
                userMenu.push(route)
            }
        });
    });
    return userMenu
}

export default recursionRoutes